﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8;" />
<link href="../../Public/css/findpw/style.css" type="text/css" rel="stylesheet"></link>

<script type="text/javascript" src="../../Public/js/jquery-1.11.0.min.js" ></script>
<script >

  $(function(){
     function setContent(str) {
str = str.replace(/<\/?[^>]*>/g,''); //去除HTML tag
str.value = str.replace(/[ | ]*\n/g,'\n'); //去除行尾空白
return str;
}
  
  
     $('#submit').click(function(){
	 
     userid =setContent($("#userid").val());
     code = setContent($("#code").val());
     ifsubmit = true;
	 if(userid==""){
		$('#userid_error').text("*请输入账号");
		ifsubmit = false;
		}else{
		$('#userid_error').text("");
		}
  
  if(code==""){
			$('#code_error').text("*验证码不能为空");
			ifsubmit = false;		
		}else{
		
		  $.ajax({
             type: "POST",
             url: "./codeverify.php",
			 data: {code:code},
			 dataType: "json",
             success: function(data){
				 if(!data){
				 ifsubmit = false;					 
				 $('#code_error').text("*验证码错误");				 
				 }else{
				 $('#code_error').text("");
				 if(ifsubmit){
				$('#myform').submit();
				
				}
				 } }
				 
			})	
		
		}
     })
  
  })

</script></head>
<style>

</style>
<body>
<div class="menu">
<div class="home_menu1">

	<div class="home_menu2"><a href="{:U('index')}"><img src="../../Public/img/qidian/Hlogo.jpg" /></a></div>

	<div class="home_menu3"><a href="{:U('index')}">起点娱乐</a></div>

	<div class="home_menu4">
	  <ul>
		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/index.html">首页</a ></li>

		<li class="home_bk"><a href ="__ROOT__/download/setup.exe">下载中心</a></li>

		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/rank/menu/2.html">人气排行</a></li>

		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/worker/menu/3.html">虚拟商城</a></li>

		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/worker/menu/4.html">个人中心</a></li>

		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/worker/menu/5.html">加盟合作</a></li>
	  </ul>
	</div>

</div>
<div class="menu1">
<form  name="myform" id="myform"  action="./verify.php"  method="POST">
<table>
<tr><td class="title">找回密码</td></tr>
<tr><td><image src="../../Public/img/findpw/line1.jpg"/></td></tr></table>
<table class="pw4_title1">
<tr><td></td><td class="pw4_title2" >请输入带问题的起点账号</td></tr>
<tr><td class="pw4_password">账号:</td><td class="pw4_text"><input type="text" name="userid" id="userid"></td><td class="error"><span id="userid_error"  ></span></td></tr>
<tr><td class="pw4_password">验证码:</td><td class="pw4_text"><input type="text" name="code" id="code"></td><td class="error"><span  id="code_error" ></span></td></tr>
<tr  class="pw4_ver"> 
       <td></td>      
      <td colspan=2><img  title="点击刷新" src="./captcha.php" align="absbottom" id="codepic" /><span onclick="document.getElementById('codepic').src='./captcha.php?'+Math.random();">换一张</span></td></tr>
	<tr><td></td><td class="pw4_sure" ><div id="submit" >下&nbsp一&nbsp步</div></td>
	</table></form>
</div>
</div>
</body></html>